﻿using Microsoft.EntityFrameworkCore.Design;
using Microsoft.EntityFrameworkCore;

namespace First_WebAPI.Entity
{
    public class DbContextDesignTimeFactory : IDesignTimeDbContextFactory<MyIdentityDbContext>
    {
        public MyIdentityDbContext CreateDbContext(string[] args)
        {
            DbContextOptionsBuilder<MyIdentityDbContext> dob = new DbContextOptionsBuilder<MyIdentityDbContext>();

            dob.UseSqlServer("server=.;database=WorkDBTest;uid=sa;pwd=itcatnetwork;TrustServerCertificate=True;");
            return new MyIdentityDbContext(dob.Options);
        }
    }
}
